home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Info-Mac 4
/
Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso
/
Development
/
General
/
MM3Tp.sea Folder
/
Made by Marksman
/
Sources
/
u
/
Floating_window.p
< prev
next >
Wrap
Text File
|
1994-01-16
|
6KB
|
267 lines
unit UFloating_window;
{ Floating_window Handle this Window }
{ Copyright © 1994 George R. Cossey }
{
File name: Floating_window
Function: Handle a Window
History: 1/16/94 Original by George Cossey
}
interface
uses
Printing,Folders,Sound,mmCommonMM_Demo,CommonMM_Demo;
{ ======================================================= }
{ ======================================================= }
procedure U_InitFloating_windowRec(theWS:Floating_windowPRec);
{ Initialize us so all our routines can be activated }
procedure U_InitFloating_window;
{ Close our window }
procedure U_CloseFloating_window(theWS:Floating_windowPRec);
{ Handle resizing scrollbars }
procedure U_ResizedFloating_window(theWS:Floating_windowPRec;OldRect:Rect);
{ Our window was moved }
procedure U_MovedFloating_window(OldRect:Rect;whichWindow:WindowPtr);
{ Update our window, someone uncovered a part of us }
procedure U_UpdateFloating_window(theWS:Floating_windowPRec);
{ Open our window and draw everything }
procedure U_OpenFloating_window(theWS:Floating_windowPRec);
{ Handle activation of our window }
procedure U_ActivateFloating_window(theWS:Floating_windowPRec;Do_An_Activate:Boolean);
{ Handle action to our window, like controls }
procedure U_DoButtonFloating_window(theWS:Floating_windowPRec;RefCon:longint;theControl:ControlHandle;var UnHiliteValue:integer);
{ Handle any special window events }
procedure U_DoEventFloating_window(theWS:Floating_windowPRec;var myEvent:EventRecord);
{ ======================================================= }
{ ======================================================= }
implementation
{ ======================================================= }
{ ======================================================= }
procedure U_InitFloating_windowRec(theWS:Floating_windowPRec);
begin
end;
{ ======================================================= }
{ Routine: U_InitFloating_window }
{ Purpose: Initialize our window data to not in use yet }
procedure U_InitFloating_window;
begin
end;
{ ======================================================= }
{ Routine: U_CloseFloating_window }
{ Purpose: Close out the window }
procedure U_CloseFloating_window(theWS:Floating_windowPRec);
begin
end;
{ ======================================================= }
{ Routine: U_ResizedFloating_window }
{ Purpose: We were resized or zoomed, update the scrolling scrollbars }
{ OldRect is the size of the window before the resize }
procedure U_ResizedFloating_window(theWS:Floating_windowPRec;OldRect:Rect);
begin
end;
{ ======================================================= }
{ Routine: U_MovedFloating_window }
{ Purpose: We were moved, possibly to another screen and screen depth }
{ OldRect is the size of the window before the resize }
procedure U_MovedFloating_window(OldRect:Rect;whichWindow:WindowPtr);
begin
end;
{ ======================================================= }
{ Routine: U_UpDateFloating_window }
{ Purpose: Update our window }
{ User can place code before or after the DrawControls }
procedure U_UpdateFloating_window(theWS:Floating_windowPRec);
begin
DrawControls(theWS^.theWindow); { Draw all the controls }
end;
{ ======================================================= }
{ Routine: U_OpenFloating_window }
{ Purpose: Open our window }
procedure U_OpenFloating_window(theWS:Floating_windowPRec);
begin
if ((theWS <> nil) and (theWS^.theWindow <> nil)) then { See if opened OK }
begin
end;
end;
{ ======================================================= }
{ Routine: U_ActivateFloating_window }
{ Purpose: We activated or deactivated }
procedure U_ActivateFloating_window(theWS:Floating_windowPRec;Do_An_Activate:Boolean);
begin
if (Do_An_Activate) then { Handle the activate }
begin
end
else
begin
end;
end;
{ ======================================================= }
{ Routine: U_DoButtonFloating_window }
{ Purpose: Handle extra buttons in our window }
{ RefCon = The RefCon of the button that was pressed }
{ theControl = The ControlHandle of the button that was pressed }
{ UnHiliteValue = 0 for unhilite, we can change that }
procedure U_DoButtonFloating_window(theWS:Floating_windowPRec;RefCon:longint;theControl:ControlHandle;var UnHiliteValue:integer);
var
theSelection:integer; { For palette and popup selections }
begin
case (RefCon) of { Select correct button }
-1:begin end;
ResC_Tool_palette2: { Palette, Tool palette }
begin
theSelection := GetCtlValue(theWS^.Ctrl_Tool_palette2);{ Get the palette value, 0xrrcc, rr is row, cc is column }
theWS^.Value_Tool_palette2 := theSelection; { Get the palette value }
case (theSelection) of { Select correct item }
-1:begin end;
257: { Row 1, Column 1 }
begin
end;
258: { Row 1, Column 2 }
begin
end;
513: { Row 2, Column 1 }
begin
end;
514: { Row 2, Column 2 }
begin
end;
769: { Row 3, Column 1 }
begin
end;
770: { Row 3, Column 2 }
begin
end;
1025: { Row 4, Column 1 }
begin
end;
1026: { Row 4, Column 2 }
begin
end;
1281: { Row 5, Column 1 }
begin
end;
1282: { Row 5, Column 2 }
begin
end;
1537: { Row 6, Column 1 }
begin
end;
1538: { Row 6, Column 2 }
begin
end;
1793: { Row 7, Column 1 }
begin
end;
1794: { Row 7, Column 2 }
begin
end;
2049: { Row 8, Column 1 }
begin
end;
2050: { Row 8, Column 2 }
begin
end;
2305: { Row 9, Column 1 }
begin
end;
2306: { Row 9, Column 2 }
begin
end;
2561: { Row 10, Column 1 }
begin
end;
2562: { Row 10, Column 2 }
begin
end;
otherwise { allow other buttons, trap for debug }
begin
end;
end; { end of switch }
end;
otherwise { allow other buttons, trap for debug }
begin
end;
end; { end of switch }
end;
{ ======================================================= }
{ Routine: U_DoEventFloating_window }
{ Purpose: Handle any special window events }
procedure U_DoEventFloating_window(theWS:Floating_windowPRec;var myEvent:EventRecord);
begin
end;
{ ======================================================= }
{ ======================================================= }
end.